/**************************************************************************************
*
*	Copyright (C) 2011 Brent Andrew O. Chua - See LICENSE.txt for more info.
*		
*	Filename	-	View.h
*
*	Description -	Various view classes.
*
*	Comments	-	This class communicates with the application logic to present the 
*						data to the observer.
*
*	Modification History:
*			Name			   Date					Description
*			CodeSushi	-	06/16/2011	-	Creation of this file
**************************************************************************************/

#ifndef _PSX_VIEW_H_
#define _PSX_VIEW_H_

#include "PulseSTD.h"

namespace Pulse
{

	PSX_EnumBegin( ApplicationViewType )
		HUMAN,
		AI,
		RECORDER,
	PSX_EnumEnd()

	// Application View base class
	typedef UINT GameViewID;
	typedef UINT ProgramID; // TODO: Move this to the program header file

	class View
	{
	public:

		virtual EErrorCode::Type	OnRestore( void ) = 0;
		virtual EErrorCode::Type	OnRender( DOUBLE time, FLOAT deltaTime ) = 0;
		virtual void				OnLostDevice( void ) = 0;
		virtual void				OnUpdate( int deltaMilliSeconds ) = 0;
		virtual BOOL				OnMsgProc( AppMsg msg ) = 0;

		virtual ApplicationViewType::Type	GetType( void ) const = 0;
		virtual GameViewID					GetID( void ) const = 0;
		virtual void						OnAttach( GameViewID viewID, Optional<ProgramID> programID ) = 0;

		virtual ~View( void ) { }

	protected:

	};

	class HumanView : public View
	{
	public:

		virtual EErrorCode::Type	OnRestore( void );
		virtual EErrorCode::Type	OnRender( DOUBLE time, FLOAT deltaTime );
		virtual void				OnLostDevice( void );
		virtual void				OnUpdate( int deltaMilliSeconds );
		virtual BOOL				OnMsgProc( AppMsg msg ) = 0;

		virtual ApplicationViewType::Type	GetType( void ) const;
		virtual GameViewID					GetID( void ) const;
		virtual void						OnAttach( GameViewID viewID, Optional<ProgramID> programID );

		virtual ~View( void ) { }


	private:


	};


}

#endif /* _PSX_VIEW_H_ */